<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCommentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('comments', function (Blueprint $table) {
            $table->id();
            $table->string('avatar')->nullable()->comment('评论者头像');
            $table->string('common_user')->nullable()->comment('评论者名称');
            $table->tinyInteger('status')->default(0)->comment('审核状态1:待审核2:审核通过,4：审核驳回');
            $table->tinyInteger('is_show')->default(1)->comment('是否隐藏');
            $table->integer('car_id')->default(0)->comment('车辆id');
            $table->string('openid')->nullable()->comment('评论者openid');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('comments');
    }
}
